<template>
    <div class='funeral_item_table'>
        <table-edit :blurChange="blurChange"  ref="tableEditss" :delset="delset" :isDel="isDel" :appid="appid" :dataField="dataField" isNative="Y" @changeAmt="changeAmts" @removeItem="removeItemTc"  :listField="listField"  :data="data"   @input="changeInput" :tabs="tabs"></table-edit>
        <div  class='amt_total'>
            <div style='float:left;line-height:40px;display:none'>减免类型：</div>
            <el-select v-model="value" placeholder="请选择" style='width:120px;float:left;display:none'>
                <el-option
                v-for="item in options"
                :key="item.value"
                :label="item.label"
                :value="item.value">
                </el-option>
            </el-select>
            <div style='float:left;line-height:40px;margin-left:20px;display:none'>总金额优惠：</div>
            <el-input v-model="sz_ex61s" placeholder="请输入优惠金额" style='width:180px;float:left;display:none'></el-input>
            <div class='amt_total_item'>
                <el-button type="success" icon="el-icon-plus"  style='margin-right:10px;font-size:18px' @click="openSelect" v-if="addBtnType=='2'">新增项目</el-button>
                <span>总金额:&nbsp;&nbsp;</span><span v-text="amt_totals" style='color:green;font-weight:bold;margin-right:30px'></span>
                <span v-if="jm_totals">{{jmTitle}}:&nbsp;&nbsp;</span><span v-text="jm_totals" v-if="jm_totals" style='color:red;font-weight:bold;margin-right:30px'></span>
                <span v-if="bz_totals">补助金额:&nbsp;&nbsp;</span><span v-text="bz_totals" v-if="bz_totals" style='color:red;font-weight:bold;margin-right:30px'></span>
                <span v-if="yh_totals">优惠金额:&nbsp;&nbsp;</span><span v-text="yh_totals" v-if="yh_totals" style='color:red;font-weight:bold;margin-right:30px'></span>
                <span v-if="isShowDetail=='Y'">单位金额:&nbsp;&nbsp;</span><span v-if="isShowDetail=='Y'" v-text="gl_totals"  style='color:green;font-weight:bold;margin-right:30px'></span>
                <span v-if="isShowDetail=='Y'">第三方金额:&nbsp;&nbsp;</span><span v-if="isShowDetail=='Y'" v-text="gs_totals"  style='color:green;font-weight:bold;margin-right:30px'></span>
                <span>{{shTitle}}:&nbsp;&nbsp;</span><span v-text="sh_totals" style='font-weight:bold;margin-right:30px'></span>
            </div>
            
        </div>
        <el-tooltip content="点击选择服务项目" placement="top" v-if="isAdd!='N'">
            <el-button type="success" icon="el-icon-plus" circle style='position:absolute;bottom:50px;right:50px' @click="openSelect" v-if="isYtj!='Y'&&addBtnType=='1'"></el-button>
            <el-button type="success" icon="el-icon-plus" circle style='position:absolute;bottom:50px;right:50px;font-size:35px' @click="openSelect" v-else-if="isYtj=='Y'"></el-button>
        </el-tooltip>
        <el-drawer
            title="服务项目选择"
            :visible.sync="drawer"
            :direction="direction" size="800px"
            append-to-body>
            <div class="left_menu" style="height:100%">
                <funeral-item-select-show  :sfItemDatas="sfItemData"  :postUrl="postUrl" :isWarehouse="isWarehouse" :exkey="exkey" ref="selectshow" :defaultClick="defaultClick" :appid="appid" @addItem="addItem" @changeAmt="changeAmts" @removeItem="removeItem" :data="data" :dataField="dataField" :gm_id="gm_id" :type2="extype" :depart="depart" :dw="dw" v-if="isYtj!='Y'&&!isDialog"  :cfCheck="cfCheck" ></funeral-item-select-show>
            </div>
        </el-drawer>
        <el-dialog title="选择服务项目" 
        append-to-body
        width="80%"
        height="70VH"
        class="selectitem"
        :visible.sync="outerVisible">
             <funeral-item-select-show  :sfItemDatas="sfItemData"  :postUrl="postUrl"  :exkey="exkey" :isWarehouse="isWarehouse" :defaultClick="defaultClick" ref="selectshow" :appid="appid" @addItem="addItem" @changeAmt="changeAmts" @removeItem="removeItem" :data="data" :dataField="dataField" :gm_id="gm_id" :type2="extype" :depart="depart" :dw="dw"  v-if="isYtj=='Y'||isDialog" isYtj="Y"  :cfCheck="cfCheck" ></funeral-item-select-show>
             <div slot="footer" class="dialog-footer" style='text-align:center;background:#c8c8c8;padding:5px'>
                <el-button @click="outerVisible = false" type="danger">关 闭</el-button>
            </div>
        </el-dialog>
    </div>
</template>
<script>

import funeralItem from '../../utils/mixin/funeralItem'
export default {
	mixins: [funeralItem],
   
}

</script>
<style scoped>
.funeral_item_table{
    height:100%;
    display:flex;
    flex-direction: column;
    overflow:hidden;
    position:relative;
}
.tableEdit{
    flex:1;
}
.amt_total{
    height:60px;
    border:1px solid #ddd;
    line-height:20px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    text-align: center;
    background:#ddd;
    -moz-box-shadow: 2px 2px 10px #909090;
   -webkit-box-shadow: 2px 2px 10px #909090;
   box-shadow:2px 2px 10px #909090;

}
.amt_total_item{
    
    padding:10px;
}
.funeral_item_table >>> .el-drawer{
    width:450px !important;
}
.amt_total >>> .el-input__inner{
    height:35px;
}
.selectitem>>>.el-dialog__footer{
    padding:0;
}
</style>
<style >

.el-drawer__header{
    margin-bottom:0 !important;
    padding:10px 10px 0 !important;
}
.el-card__header{
    padding:5px 5px !important;
}
.el-card__body{
    padding-top:0 !important;
    padding-left:0 !important;
    padding-right:0 !important;
}
</style>
<style >

</style>